﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Teigha.Core;

namespace Teigha.TD
{
	public class OdDbNurbSurface : OdDbSurface
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdDbNurbSurface(IntPtr cPtr, bool cMemoryOwn) : base(TD_DbPINVOKE.OdDbNurbSurface_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdDbNurbSurface obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdDbNurbSurface()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							TD_DbPINVOKE.delete_OdDbNurbSurface(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdDbNurbSurface cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbNurbSurface_cast(OdRxObject.getCPtr(pObj));
			OdDbNurbSurface result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbNurbSurface)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbNurbSurface)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbNurbSurface)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbNurbSurface_desc(), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbNurbSurface_isA(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbNurbSurface_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdDbNurbSurface createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbNurbSurface_createObject();
			OdDbNurbSurface result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbNurbSurface)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbNurbSurface)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbNurbSurface)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult get(out int iUDegree, out int iVDegree, out bool bRational, out int iUNumControlPoints, out int iVNumControlPoints, OdGePoint3dArray ctrlPtsArr, OdGeDoubleArray weights, OdGeKnotVector uKnots, OdGeKnotVector vKnots)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_get(this.swigCPtr, out iUDegree, out iVDegree, out bRational, out iUNumControlPoints, out iVNumControlPoints, OdGePoint3dArray.getCPtr(ctrlPtsArr), OdGeDoubleArray.getCPtr(weights), OdGeKnotVector.getCPtr(uKnots), OdGeKnotVector.getCPtr(vKnots));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult set(int iUDegree, int iVDegree, bool bRational, int iUNumControlPoints, int iVNumControlPoints, OdGePoint3dArray ctrlPtsArr, OdGeDoubleArray weights, OdGeKnotVector uKnots, OdGeKnotVector vKnots)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_set(this.swigCPtr, iUDegree, iVDegree, bRational, iUNumControlPoints, iVNumControlPoints, OdGePoint3dArray.getCPtr(ctrlPtsArr), OdGeDoubleArray.getCPtr(weights), OdGeKnotVector.getCPtr(uKnots), OdGeKnotVector.getCPtr(vKnots));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult dwgInFields(OdDbDwgFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_dwgInFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dwgOutFields(OdDbDwgFiler pFiler)
		{
			TD_DbPINVOKE.OdDbNurbSurface_dwgOutFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfInFields(OdDbDxfFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_dxfInFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dxfOutFields(OdDbDxfFiler pFiler)
		{
			TD_DbPINVOKE.OdDbNurbSurface_dxfOutFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdResult getControlPoints(out int iUCount, out int iVCount, OdGePoint3dArray points)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getControlPoints(this.swigCPtr, out iUCount, out iVCount, OdGePoint3dArray.getCPtr(points));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setControlPoints(int iUCount, int iVCount, OdGePoint3dArray points)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_setControlPoints(this.swigCPtr, iUCount, iVCount, OdGePoint3dArray.getCPtr(points));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getControlPointAt(int iUIndex, int iVIndex, OdGePoint3d point)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getControlPointAt(this.swigCPtr, iUIndex, iVIndex, OdGePoint3d.getCPtr(point));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setControlPointAt(int iUIndex, int iVIndex, OdGePoint3d point)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_setControlPointAt(this.swigCPtr, iUIndex, iVIndex, OdGePoint3d.getCPtr(point));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getNumberOfControlPointsInU(out int iCount)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getNumberOfControlPointsInU(this.swigCPtr, out iCount);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getNumberOfControlPointsInV(out int iCount)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getNumberOfControlPointsInV(this.swigCPtr, out iCount);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getUKnots(OdGeKnotVector knots)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getUKnots(this.swigCPtr, OdGeKnotVector.getCPtr(knots));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getVKnots(OdGeKnotVector knots)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getVKnots(this.swigCPtr, OdGeKnotVector.getCPtr(knots));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getNumberOfKnotsInU(out int iCount)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getNumberOfKnotsInU(this.swigCPtr, out iCount);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getNumberOfKnotsInV(out int iCount)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getNumberOfKnotsInV(this.swigCPtr, out iCount);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getWeight(int iUIndex, int iVIndex, out double weight)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getWeight(this.swigCPtr, iUIndex, iVIndex, out weight);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setWeight(int iUIndex, int iVIndex, double weight)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_setWeight(this.swigCPtr, iUIndex, iVIndex, weight);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult evaluate(double dU, double dV, OdGePoint3d pos)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_evaluate__SWIG_0(this.swigCPtr, dU, dV, OdGePoint3d.getCPtr(pos));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult evaluate(double dU, double dV, OdGePoint3d pos, OdGeVector3d uDeriv, OdGeVector3d vDeriv)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_evaluate__SWIG_1(this.swigCPtr, dU, dV, OdGePoint3d.getCPtr(pos), OdGeVector3d.getCPtr(uDeriv), OdGeVector3d.getCPtr(vDeriv));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult evaluate(double dU, double dV, OdGePoint3d pos, OdGeVector3d uDeriv, OdGeVector3d vDeriv, OdGeVector3d uuDeriv, OdGeVector3d uvDeriv, OdGeVector3d vvDeriv)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_evaluate__SWIG_2(this.swigCPtr, dU, dV, OdGePoint3d.getCPtr(pos), OdGeVector3d.getCPtr(uDeriv), OdGeVector3d.getCPtr(vDeriv), OdGeVector3d.getCPtr(uuDeriv), OdGeVector3d.getCPtr(uvDeriv), OdGeVector3d.getCPtr(vvDeriv));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult evaluate(double dU, double dV, int iDerivDegree, OdGePoint3d point, OdGeVector3dArray derivatives)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_evaluate__SWIG_3(this.swigCPtr, dU, dV, iDerivDegree, OdGePoint3d.getCPtr(point), OdGeVector3dArray.getCPtr(derivatives));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getDegreeInU(out int iDegree)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getDegreeInU(this.swigCPtr, out iDegree);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getDegreeInV(out int iDegree)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getDegreeInV(this.swigCPtr, out iDegree);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult isClosedInU(out bool bIsClosed)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_isClosedInU(this.swigCPtr, out bIsClosed);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult isClosedInV(out bool bIsClosed)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_isClosedInV(this.swigCPtr, out bIsClosed);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult isPeriodicInU(out bool bIsPeriodic)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_isPeriodicInU(this.swigCPtr, out bIsPeriodic);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult isPeriodicInV(out bool bIsPeriodic)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_isPeriodicInV(this.swigCPtr, out bIsPeriodic);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getPeriodInU(out double dPeriod)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getPeriodInU(this.swigCPtr, out dPeriod);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getPeriodInV(out double dPeriod)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getPeriodInV(this.swigCPtr, out dPeriod);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult isRational(out bool bIsRational)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_isRational(this.swigCPtr, out bIsRational);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult isPlanar(out bool bIsPlanar, OdGePoint3d ptOnSurface, OdGeVector3d normal)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_isPlanar(this.swigCPtr, out bIsPlanar, OdGePoint3d.getCPtr(ptOnSurface), OdGeVector3d.getCPtr(normal));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult isPointOnSurface(OdGePoint3d point, out bool bOnSurface)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_isPointOnSurface(this.swigCPtr, OdGePoint3d.getCPtr(point), out bOnSurface);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getNormal(double dU, double dV, OdGeVector3d normal)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getNormal(this.swigCPtr, dU, dV, OdGeVector3d.getCPtr(normal));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getNumberOfSpansInU(out int span)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getNumberOfSpansInU(this.swigCPtr, out span);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getNumberOfSpansInV(out int span)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getNumberOfSpansInV(this.swigCPtr, out span);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getIsolineAtU(double dU, OdDbCurvePtrArray lineSegments)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getIsolineAtU(this.swigCPtr, dU, OdDbCurvePtrArray.getCPtr(lineSegments));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getIsolineAtV(double dV, OdDbCurvePtrArray lineSegments)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getIsolineAtV(this.swigCPtr, dV, OdDbCurvePtrArray.getCPtr(lineSegments));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult InsertKnotAtU(double dU)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_InsertKnotAtU(this.swigCPtr, dU);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult InsertKnotAtV(double dV)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_InsertKnotAtV(this.swigCPtr, dV);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult InsertControlPointsAtU(double dU, OdGePoint3dArray vCtrlPts, OdGeDoubleArray vWeights)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_InsertControlPointsAtU(this.swigCPtr, dU, OdGePoint3dArray.getCPtr(vCtrlPts), OdGeDoubleArray.getCPtr(vWeights));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult InsertControlPointsAtV(double dV, OdGePoint3dArray uCtrlPts, OdGeDoubleArray uWeights)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_InsertControlPointsAtV(this.swigCPtr, dV, OdGePoint3dArray.getCPtr(uCtrlPts), OdGeDoubleArray.getCPtr(uWeights));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult RemoveControlPointsAtU(int iUDegree)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_RemoveControlPointsAtU(this.swigCPtr, iUDegree);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult RemoveControlPointsAtV(int iVDegree)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_RemoveControlPointsAtV(this.swigCPtr, iVDegree);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult rebuild(int iUDegree, int iVDegree, int iNumUCtrlPts, int iNumVCtrlPts, bool bRestore)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_rebuild__SWIG_0(this.swigCPtr, iUDegree, iVDegree, iNumUCtrlPts, iNumVCtrlPts, bRestore);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult rebuild(int iUDegree, int iVDegree, int iNumUCtrlPts, int iNumVCtrlPts)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_rebuild__SWIG_1(this.swigCPtr, iUDegree, iVDegree, iNumUCtrlPts, iNumVCtrlPts);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult modifyPositionAndTangent(double dU, double dV, OdGePoint3d point, OdGeVector3d uDeriv, OdGeVector3d vDeriv)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_modifyPositionAndTangent__SWIG_0(this.swigCPtr, dU, dV, OdGePoint3d.getCPtr(point), OdGeVector3d.getCPtr(uDeriv), OdGeVector3d.getCPtr(vDeriv));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult modifyPositionAndTangent(double dU, double dV, OdGePoint3d point, OdGeVector3d uDeriv)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_modifyPositionAndTangent__SWIG_1(this.swigCPtr, dU, dV, OdGePoint3d.getCPtr(point), OdGeVector3d.getCPtr(uDeriv));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult modifyPositionAndTangent(double dU, double dV, OdGePoint3d point)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_modifyPositionAndTangent__SWIG_2(this.swigCPtr, dU, dV, OdGePoint3d.getCPtr(point));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getParameterOfPoint(OdGePoint3d point, out double dU, out double dV)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_getParameterOfPoint(this.swigCPtr, OdGePoint3d.getCPtr(point), out dU, out dV);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult convertFrom(OdDbSurface pSource, DwgVersion version, bool transferId)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_convertFrom__SWIG_0(this.swigCPtr, OdDbSurface.getCPtr(pSource), (int)version, transferId);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult convertFrom(OdDbSurface pSource, DwgVersion version)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbNurbSurface_convertFrom__SWIG_1(this.swigCPtr, OdDbSurface.getCPtr(pSource), (int)version);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
